<script lang="ts" setup>


import { computed, ref } from 'vue'

let flag=ref(false)

const search = ref('')

const handleEdit = (index: number, row ) => {
 flag.value=true
}
const handleDelete = (index: number, row) => {
  console.log(index, row)
}
const tableData = [
  {
    id: 1,
    shangpin: '商品一',
    img: '/1.jpg',
    yonghu:'张三',
    neirong:'123456789',
    
  },

]


</script>

<template>
          <!-- 表格 -->
          <el-table :data="tableData" style="width: 100%">
        <el-table-column label="id" prop="id" />
        <el-table-column label="商品" prop="shangpin" />
        <el-table-column label="商品图片" prop="img" >
            <img src="/1.jpg" alt=""  style="width: 100px; height: 100px;">
            </el-table-column>
            <el-table-column label="评价用户" prop="yonghu" />
            <el-table-column label="评价内容" prop="neirong" />
        <el-table-column align="right" label="操作">
       
        <template #default="scope">
          
            <el-button
            size="small"
            type="danger"
            @click="handleDelete(scope.$index, scope.row)"
            >删除</el-button
            >
        </template>
        </el-table-column>
            </el-table>
</template>

<style lang="less" scoped>
</style>
